cmake_minimum_required(VERSION 3.17)
project(wxTest)

set(CMAKE_CXX_STANDARD 20)

#add_library(/usr/include/wx-3.0/)
#add_library(/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0/)
#find_library(wxWidgets)
#find_library(MY_LIB libmylib.a ./)
#target_link_libraries(${PROJECT_NAME} ${MY_LIB})
#find_package( "pthread" )
add_definitions("-D WXUSINGDLL")
add_definitions("-D __WXGTK__")
add_definitions("-D _DEBUG_" )

#add_executable(wxTest main.cpp MyApp.h MyApp.cpp
#        PreferenceCore.h PreferenceCore.cpp
#        Preference.cpp Preference.h
#        Blog.cpp Blog.h PreferenceScreen.cpp PreferenceScreen.h
#        InputDialog.cpp InputDialog.h PreferencesFrame.cpp PreferencesFrame.h
#        SwitchControl.cpp SwitchControl.h DhBitmapButton.cpp DhBitmapButton.h TimerDemo.cpp TimerDemo.h)

add_library(preference
        view/PreferenceAdapter.h view/PreferenceAdapter.cpp
        model/MyTagApp.h model/MyTagApp.cpp
        model/PreferenceCore.h model/PreferenceCore.cpp
        data/PreferenceItem.cpp data/PreferenceItem.h
        data/PreferenceView.h data/Preference.cpp
        data/PreferenceStorage.cpp data/PreferenceStorage.h
        view/InputDialog.cpp view/InputDialog.h
        view/PreferencesFrame.cpp view/PreferencesFrame.h
        view/ListViewAdapter.h view/ListViewAdapter.cpp
        view/PreferenceData.h view/PreferenceData.cpp
        #undefined/SwitchControl.cpp undefined/SwitchControl.h undefined/DhBitmapButton.cpp undefined/DhBitmapButton.h undefined/TimerDemo.cpp undefined/TimerDemo.h
        #undefined/Blog.cpp undefined/Blog.h undefined/PreferenceScreen.cpp undefined/PreferenceScreen.h
        )

target_include_directories(preference PUBLIC
        "/usr/include/wx-3.0/"
        "/usr/include/c++/9/"
        "/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0/"
        )

#`wx-config --libs`
#-L/usr/lib/x86_64-linux-gnu
#-L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0
#-lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
#gtk2
#
#"wx_gtk2u_xrc-3.0" "wx_gtk2u_html-3.0" "wx_gtk2u_qa-3.0" "wx_gtk2u_adv-3.0" "wx_gtk2u_core-3.0"
target_link_libraries( preference "pthread" "sqlite3"
        "wx_baseu_xml-3.0"
        "wx_gtk3u_core-3.0"
        "wx_baseu_net-3.0" "wx_baseu-3.0")

#test demo
